@extends('home/myhouse/layout')
@section('title','消息管理')
@section('content')
<div>
    <div style="height:20px;"></div>
    <div style="font-size:20px;float:left"> 确认收货地址</div>
    
    <div style="margin:0;padding:0; width:100%;height:1px;background-color:#EFEFEF;overflow:hidden;"></div>
    <div style="height:20px;"></div>
</div>
@if (count($errors) > 0)
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

@if(session('success'))
<div class="alert alert-danger">
        <ul>
            <li>{{session('success')}}</li>
        </ul>
    </div>   
@endif
   <div class="row">
        <div class="col-md-3">
            <button class="btn btn-primary"  id="createadd" style="background-color:orange;">添加收货地址</button>

        </div>
    </div>
<form action="" method="">
    {{csrf_field()}}
    <div style="height:30px;"></div>
    <table id="member_list" class="table table-bordered table-striped text-center">
        <thead>
          <tr>
            <th style="text-align:center">ID</th>
            <th style="text-align:center">省市</th>
            <th style="text-align:center">详细地址</th>
            <th style="text-align:center">操作</th>
          </tr>
        </thead>
        <thead>
        @foreach($data as $key=>$val)
          <tr>
            <td><input type="radio" name="mem_id">{{$val->rec_add_id}}</td>
            <td>{{$val->region_name}}</td>
            <td>{{$val->con_address}}</td>
            <td><a href="/myhouse/edit/{{$val->rec_add_id}}">修改</a>||<a href="/myhouse/delete/{{$val->rec_add_id}}">删除</a></td>
          </tr>
        @endforeach
        </thead>
    </table>
    <center>
        <button type="submit" class="btn btn-primary">提交</button> 
    </center>
       
    
       
</form>
 
<script type="text/javascript">
    // alert($);
    $('#createadd').on('click',function(){
       window.location.href='/myhouse/addressadd';
    });
    
</script>
@stop